package cn.wolfcode.mongodb.repository;

import cn.wolfcode.mongodb.domain.User;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface UserMongoRepository extends MongoRepository<User,String> {

    List<User> findByName(String name);

    List<User> findByNameLike(String name);

    List<User> findByNameAndAgeGreaterThanEqual(String name, Integer age);

    List<User> findByAgeBetween(int min, int max);
}
